Signedness-Agnostic Program Analysis: Precise Integer Bounds for Low-Level Code
نویسندگان
چکیده
Many compilers target common back-ends, thereby avoiding the need to implement the same analyses for many different source languages. This has led to interest in static analysis of LLVM code. In LLVM (and similar languages) most signedness information associated with variables has been compiled away. Current analyses of LLVM code tend to assume that either all values are signed or all are unsigned (except where the code specifies the signedness). We show how program analysis can simultaneously consider each bit-string to be both signed and unsigned, thus improving precision, and we implement the idea for the specific case of integer bounds analysis. Experimental evaluation shows that this provides higher precision at little extra cost. Our approach turns out to be beneficial even when all signedness information is available, such as when analysing C or Java code.
منابع مشابه
Conservative Signed/Unsigned Type Inference for Binaries using Minimum Cut
Recovering variable types or other structural information from binaries is useful for reverse engineering in security, and to facilitate other kinds of analysis on binaries. However such reverse engineering tasks often lack precise problem definitions; some information is lost during compilation, and existing tools can exhibit a variety of errors. As a step in the direction of more principled r...
متن کاملImproving the Accuracy of Integer Signedness Error Detection Using Data Flow Analysis
Integer signedness error can be exploited by attackers to cause severe damages to computer systems. Despite of the significant advances in automating the detection of integer signedness errors, accurately differentiating exploitable and harmful signedness errors from unharmful ones still remains an open problem. In this paper, we present the design and implementation of SignFlow, an instrumenta...
متن کاملModular Bug-finding for Integer Overflows in the Large: Sound, Efficient, Bit-precise Static Analysis
We describe a methodology and a tool for performing scalable bit-precise static analysis. The tool combines the scalable static analysis engine PREfix [14] and the bit-precise efficient SMT solver Z3 [20]. Since 1999, PREfix has been used at Microsoft to analyze C/C++ production code. It relies on an efficient custom constraint solver, but addresses bit-level semantics only partially. On the ot...
متن کاملType-Based Amortized Resource Analysis with Integers and Arrays
Proving bounds on the resource consumption of a program by statically analyzing its source code is an important and well-studied problem. Automatic approaches for numeric programs with side effects usually apply abstract interpretation–based invariant generation to derive bounds on loops and recursion depths of function calls. This paper presents an alternative approach to resource-bound analys...
متن کاملA Interval Analysis and Machine Arithmetic: Why Signedness Ignorance is Bliss
addition and subtraction and also how multiplication by a constant can be handled efficiently. Again, a claim that clockwise intervals form a lattice cannot be correct. Gotlieb et al. [2010] assume unsigned representation and general multiplication and bitwise operations are not discussed. The paper presents the unsigned case only and does not address the issues that arise when signedness infor...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2012